package com.turing.post.salesmanage.util;

// default package

import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 充值单卡充值明细
 * 
 * @author zxppanda
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "DEPOSITORDERDETAIL")
@IdClass(DepositOrderDetail.class)
public class DepositOrderDetail implements java.io.Serializable {

	private BigInteger depositOrderId;// 充值单ID
	private String batchNo;// 批次号
	private String cardSeqNo;// 卡序号
	private String cardNo;// 卡号
	private BigInteger customId;// 持卡人
	private String name;
	private String customIdNo;
	private BigInteger depositAmount;// 充值金额
	private BigInteger cardFaceId;// 卡面
	private BigInteger cardClassicId;

	public DepositOrderDetail() {

	}

	@Id
	@Column(name = "DEPOSITORDERID")
	public BigInteger getDepositOrderId() {
		return depositOrderId;
	}

	public void setDepositOrderId(BigInteger depositOrderId) {
		this.depositOrderId = depositOrderId;
	}

	@Id
	@Column(name = "BATCHNO")
	public String getBatchNo() {
		return batchNo;
	}

	public void setBatchNo(String batchNo) {
		this.batchNo = batchNo;
	}

	@Id
	@Column(name = "CARDSEQNO")
	public String getCardSeqNo() {
		return cardSeqNo;
	}

	public void setCardSeqNo(String cardSeqNo) {
		this.cardSeqNo = cardSeqNo;
	}

	@Column(name = "CARDNO")
	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	@Column(name = "CUSTOMID")
	public BigInteger getCustomId() {
		return customId;
	}

	public void setCustomId(BigInteger customId) {
		this.customId = customId;
	}
	@Id
	@Column(name = "DEPOSITAMOUNT")
	public BigInteger getDepositAmount() {
		return depositAmount;
	}

	public void setDepositAmount(BigInteger depositAmount) {
		this.depositAmount = depositAmount;
	}

	@Transient
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Transient
	public String getCustomIdNo() {
		return customIdNo;
	}

	public void setCustomIdNo(String customIdNo) {
		this.customIdNo = customIdNo;
	}

	@Transient
	public BigInteger getCardFaceId() {
		return cardFaceId;
	}

	public void setCardFaceId(BigInteger cardFaceId) {
		this.cardFaceId = cardFaceId;
	}

	@Transient
	public BigInteger getCardClassicId() {
		return cardClassicId;
	}

	public void setCardClassicId(BigInteger cardClassicId) {
		this.cardClassicId = cardClassicId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((this.getBatchNo() == null) ? 0 : this.getBatchNo()
						.hashCode());
		result = prime
				* result
				+ ((this.getCardSeqNo() == null) ? 0 : this.getCardSeqNo()
						.hashCode());
		result = prime
				* result
				+ ((this.getDepositOrderId() == null) ? 0 : this
						.getDepositOrderId().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final DepositOrderDetail other = (DepositOrderDetail) obj;
		if (this.getBatchNo() == null) {
			if (other.getBatchNo() != null)
				return false;
		} else if (!this.getBatchNo().equals(other.getBatchNo()))
			return false;
		if (this.getCardSeqNo() == null) {
			if (other.getCardSeqNo() != null)
				return false;
		} else if (!this.getCardSeqNo().equals(other.getCardSeqNo()))
			return false;
		if (getDepositOrderId() == null) {
			if (other.getDepositOrderId() != null)
				return false;
		} else if (!getDepositOrderId().equals(other.getDepositOrderId()))
			return false;
		return true;
	}
}